package com.lin.mqdemo.activemq.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * 消费者监听端口
 *
 * @author lin
 * @date 2018年8月29日
 */
@Component
public class Consumer {

    @JmsListener(destination = "${test.mq-queue.demo1}")
    public void receiveQueue1(String message) {
        System.out.println("监听queue1=============监听queue");
        System.out.println(message);
    }

    @JmsListener(destination = "${test.mq-queue.demo2}")
    public void receiveQueue2(String message) {
        System.out.println("监听queue2=============监听queue");
        System.out.println(message);
    }

    @JmsListener(destination = "${test.mq-queue.demo3}")
    public void receiveQueue3(String message) {
        System.out.println("监听queue3=============监听queue");
        System.out.println(message);
    }
}
